package me.yushuai.wukong.base.entity;

import lombok.*;
import me.yushuai.wukong.common.domain.AbstractAudit;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Objects;

/**
 * @author zhoushuai@189.cn
 */
@Getter
@Setter
@Entity
@ToString
@Table(name = "BAS_ZONE_GROUP")
public class ZoneGroup extends AbstractAudit implements Serializable {
    /**
     * 区域ID
     */
    @Id
    @Column(name = "ZONE_GROUP_ID")
    private Long zoneGroupId;

    /**
     * 区域CODE
     */
    @Column(name = "ZONE_GROUP_CODE", updatable = false, nullable = false)
    private String bizId;

    /**
     * 区域描述
     */
    @Column(name = "DESC_CH")
    private String descCh;

    /**
     * 所属仓库
     */
    @Column(name = "WAREHOUSE_ID", updatable = false, nullable = false)
    private Long warehouseId;

    /**
     * 拣货位设置
     */
    @Column(name = "PICK_LOCATION")
    private String pickLocation;

    /**
     * 拣货顺序
     */
    @Column(name = "PICK_SEQUENCE")
    private String pickSequence;

    /**
     * 日期型动态属性01
     */
    @Column(name = "DADD01")
    private LocalDateTime dadd01;

    /**
     * 日期型动态属性02
     */
    @Column(name = "DADD02")
    private LocalDateTime dadd02;

    /**
     * 日期型动态属性03
     */
    @Column(name = "DADD03")
    private LocalDateTime dadd03;

    /**
     * 日期型动态属性04
     */
    @Column(name = "DADD04")
    private LocalDateTime dadd04;

    /**
     * 日期时间型动态属性01
     */
    @Column(name = "DADT01")
    private LocalDateTime dadt01;

    /**
     * 日期时间型动态属性02
     */
    @Column(name = "DADT02")
    private LocalDateTime dadt02;

    /**
     * 日期时间型动态属性03
     */
    @Column(name = "DADT03")
    private LocalDateTime dadt03;

    /**
     * 日期时间型动态属性04
     */
    @Column(name = "DADT04")
    private LocalDateTime dadt04;

    /**
     * 字符串型动态属性01
     */
    @Column(name = "DAVR01")
    private String davr01;

    /**
     * 字符串型动态属性02
     */
    @Column(name = "DAVR02")
    private String davr02;

    /**
     * 字符串型动态属性03
     */
    @Column(name = "DAVR03")
    private String davr03;

    /**
     * 字符串型动态属性04
     */
    @Column(name = "DAVR04")
    private String davr04;

    /**
     * 字符型动态属性01
     */
    @Column(name = "DACH01")
    private String dach01;

    /**
     * 字符型动态属性02
     */
    @Column(name = "DACH02")
    private String dach02;

    /**
     * 字符型动态属性03
     */
    @Column(name = "DACH03")
    private String dach03;

    /**
     * 字符型动态属性04
     */
    @Column(name = "DACH04")
    private String dach04;

    /**
     * 整型动态属性01
     */
    @Column(name = "DAIN01")
    private Integer dain01;

    /**
     * 整型动态属性02
     */
    @Column(name = "DAIN02")
    private Integer dain02;

    /**
     * 整型动态属性03
     */
    @Column(name = "DAIN03")
    private Integer dain03;

    /**
     * 整型动态属性04
     */
    @Column(name = "DAIN04")
    private Integer dain04;

    /**
     * 浮点型动态属性01
     */
    @Column(name = "DAFL01")
    private BigDecimal dafl01;

    /**
     * 浮点型动态属性02
     */
    @Column(name = "DAFL02")
    private BigDecimal dafl02;

    /**
     * 浮点型动态属性03
     */
    @Column(name = "DAFL03")
    private BigDecimal dafl03;

    /**
     * 浮点型动态属性04
     */
    @Column(name = "DAFL04")
    private BigDecimal dafl04;

    /**
     * 备注说明
     */
    @Column(name = "NOTES")
    private String notes;

    /**
     * 自定义01
     */
    @Column(name = "UDF01")
    private String udf01;

    /**
     * 自定义02
     */
    @Column(name = "UDF02")
    private String udf02;

    /**
     * 自定义03
     */
    @Column(name = "UDF03")
    private String udf03;

    /**
     * 自定义04
     */
    @Column(name = "UDF04")
    private String udf04;

    /**
     * 自定义05
     */
    @Column(name = "UDF05")
    private String udf05;

    /**
     * 自定义06
     */
    @Column(name = "UDF06")
    private String udf06;

    /**
     * 自定义07
     */
    @Column(name = "UDF07")
    private String udf07;

    /**
     * 自定义08
     */
    @Column(name = "UDF08")
    private String udf08;

    /**
     * 当前版本号
     */
    @Version
    @Column(name = "CUR_VER_NO", nullable = false)
    private Long curVerNo;

    /**
     * 操作流水号标记
     */
    @Column(name = "OPRSEQFG")
    private String oprseqfg;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }
        ZoneGroup zoneGroup = (ZoneGroup) o;
        return Objects.equals(getZoneGroupId(), zoneGroup.getZoneGroupId()) && Objects.equals(getBizId(), zoneGroup.getBizId()) && Objects.equals(getDescCh(), zoneGroup.getDescCh()) && Objects.equals(getWarehouseId(), zoneGroup.getWarehouseId()) && Objects.equals(getPickLocation(), zoneGroup.getPickLocation()) && Objects.equals(getPickSequence(), zoneGroup.getPickSequence()) && Objects.equals(getDadd01(), zoneGroup.getDadd01()) && Objects.equals(getDadd02(), zoneGroup.getDadd02()) && Objects.equals(getDadd03(), zoneGroup.getDadd03()) && Objects.equals(getDadd04(), zoneGroup.getDadd04()) && Objects.equals(getDadt01(), zoneGroup.getDadt01()) && Objects.equals(getDadt02(), zoneGroup.getDadt02()) && Objects.equals(getDadt03(), zoneGroup.getDadt03()) && Objects.equals(getDadt04(), zoneGroup.getDadt04()) && Objects.equals(getDavr01(), zoneGroup.getDavr01()) && Objects.equals(getDavr02(), zoneGroup.getDavr02()) && Objects.equals(getDavr03(), zoneGroup.getDavr03()) && Objects.equals(getDavr04(), zoneGroup.getDavr04()) && Objects.equals(getDach01(), zoneGroup.getDach01()) && Objects.equals(getDach02(), zoneGroup.getDach02()) && Objects.equals(getDach03(), zoneGroup.getDach03()) && Objects.equals(getDach04(), zoneGroup.getDach04()) && Objects.equals(getDain01(), zoneGroup.getDain01()) && Objects.equals(getDain02(), zoneGroup.getDain02()) && Objects.equals(getDain03(), zoneGroup.getDain03()) && Objects.equals(getDain04(), zoneGroup.getDain04()) && Objects.equals(getDafl01(), zoneGroup.getDafl01()) && Objects.equals(getDafl02(), zoneGroup.getDafl02()) && Objects.equals(getDafl03(), zoneGroup.getDafl03()) && Objects.equals(getDafl04(), zoneGroup.getDafl04()) && Objects.equals(getNotes(), zoneGroup.getNotes()) && Objects.equals(getUdf01(), zoneGroup.getUdf01()) && Objects.equals(getUdf02(), zoneGroup.getUdf02()) && Objects.equals(getUdf03(), zoneGroup.getUdf03()) && Objects.equals(getUdf04(), zoneGroup.getUdf04()) && Objects.equals(getUdf05(), zoneGroup.getUdf05()) && Objects.equals(getUdf06(), zoneGroup.getUdf06()) && Objects.equals(getUdf07(), zoneGroup.getUdf07()) && Objects.equals(getUdf08(), zoneGroup.getUdf08()) && Objects.equals(getCurVerNo(), zoneGroup.getCurVerNo()) && Objects.equals(getOprseqfg(), zoneGroup.getOprseqfg());
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), getZoneGroupId(), getBizId(), getDescCh(), getWarehouseId(), getPickLocation(), getPickSequence(), getDadd01(), getDadd02(), getDadd03(), getDadd04(), getDadt01(), getDadt02(), getDadt03(), getDadt04(), getDavr01(), getDavr02(), getDavr03(), getDavr04(), getDach01(), getDach02(), getDach03(), getDach04(), getDain01(), getDain02(), getDain03(), getDain04(), getDafl01(), getDafl02(), getDafl03(), getDafl04(), getNotes(), getUdf01(), getUdf02(), getUdf03(), getUdf04(), getUdf05(), getUdf06(), getUdf07(), getUdf08(), getCurVerNo(), getOprseqfg());
    }
}